<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="Dao.*"%>
<%@page import="model.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>查看博文详情</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="text/javascript"
	src="image/bootstrap-3.0.3-dist/dist/js/jquery-2.1.1.min.js"></script>
<script type="text/javascript"
	src="image/bootstrap-3.0.3-dist/dist/js/bootstrap.min.js"></script>

<link href="image/bootstrap-3.0.3-dist/dist/css/bootstrap.css"
	rel="stylesheet" type="text/css">
<link href="image/bootstrap-3.0.3-dist/dist/css/bootstrap-theme.min.css"
	rel="stylesheet" type="text/css">
<link href="image/Flat-UI-master/css/flat-ui.css" rel="stylesheet"
	type="text/css">
<style>
#top {
	margin-top: 50px;
}

#bg1 {
	background: #ECF0F1;
}

#bg2 {
	background: #06F;
}

#message {
	height: 900px;
	float: left;
}

#message2 {
	height: 900px;
	float: right;
}

#bottom {
	height: 50px;
	background: #C03;
	margin-bottom: 20px;
}
</style>
</head>
<body class="padding-bottom: 70px;">

	<!-- 导航栏 -->
<div class="navbar  navbar-inverse navbar-fixed-top " role="navigation">
		<div class=" col-md-1"></div>
		<div class=" col-md-2">
			<a href="index.jsp" class="navbar-brand">首页</a>
		</div>
		<div class=" col-md-2">
			<a href="messagelist.jsp" class="navbar-brand">文章</a>
		</div>
		<div class=" col-md-2">
			<a href="showalbum.jsp" class="navbar-brand">相册</a>
		</div>
		<div class=" col-md-2">
			<c:choose>
				<%-- <c:when test="${sessionScope.adminname.adminName eq 'cjm'}"> --%>
				<c:when test="${!empty sessionScope.adminname.adminName}">
					<a href="" class="navbar-brand">欢迎登录${sessionScope.adminname.adminName}</a>
				</c:when>
				<%-- <c:when test="${sessionScope.visitorname.visitorName eq '456'}"> --%>
				<c:when test="${!empty  sessionScope.visitorname.visitorName}">
					<a href="" class="navbar-brand">登录${sessionScope.visitorname.visitorName}</a>
				</c:when>
				<c:when test="${empty sessionScope.adminname.adminName }">
					<a href="login.jsp" class="navbar-brand">登录</a>
				</c:when>

			</c:choose>
		</div>
		<div class=" col-md-2">
			<c:choose>
				<%-- <c:when test="${sessionScope.adminname.adminName eq 'cjm'}"> --%>
				<c:when test="${!empty sessionScope.adminname.adminName}">
					<ul class="nav navbar-inverse">

						<li class="dropdown"><a class="dropdown-toggle navbar-brand"
							data-toggle="dropdown" href="#"> 后台&&退出<span class="caret"></span>
						</a>
							<ul class="dropdown-menu">
								<li><a href="manage.jsp"">进入后台</a></li>
								<li><a href="logout.action">退出系统</a></li>
							</ul></li>
					</ul>
				</c:when>
				<c:when test="${!empty  sessionScope.visitorname.visitorName}">
					<a href="logout2.action" class="navbar-brand">退出</a>
				</c:when>
			</c:choose>
		</div>
	</div>

	<div class="row" id="top">
		<div class="col-md-1"></div>
		<div class="col-md-2" id="bg1"
			style="height:900px;  margin:20px auto;">
			<div style=" width:180px; height:180px; margin-top:20px;">
				<img src="${sessionScope.adminall.adminPortrait}" width="180px"
					height="180px">
			</div>
			<div style="margin:10px;">
				<table>
					<tr>
						<td>姓名: ${sessionScope.adminall.adminName}</td>
					</tr>
					<tr>
						<td>手机:${sessionScope.adminall.adminPhone}</td>
					</tr>
					<tr>
						<td>emial:${sessionScope.adminall.adminEmail}</td>
					</tr>
					<tr>
						<td>web地址:${sessionScope.adminall.adminwebadd}</td>
					</tr>
				</table>
			</div>


			<div class="panel panel-default" style=" margin-top:100px;">
				<div class="panel-heading">标签列表</div>
				<div class="panel-body">

					<li class="fui-cmd">标签</li>
					<li class="fui-cmd">标签</li>
					<li class="fui-cmd">标签</li>
					<li class="fui-cmd">标签</li>
					<li class="fui-cmd">标签</li>
					<li class="fui-cmd">标签</li>
					<li class="fui-cmd">标表</li>

				</div>
			</div>


			<div>这里有一堆东西</div>
		</div>
		<div class="col-md-8" id="bg1"
			style=" margin:20px auto auto 10px; height:900px;">


			<div class="col-md-8">
				<div style=" margin:20px 10px auto; height:50px">
					<h3>${sessionScope.message.title}</h3>
					<div style=" margin:0px 10px auto; height:50px">
						时间:${sessionScope.message. date}</div>

					<div style="/*  width:600px; */margin:0px 10px auto; height:50px">
						博文标签: <span class="label label-default">${sessionScope.message.tag}</span>
					</div>

					<div style="/*  width:600px; */ margin:20px 10px auto; height:50px">
						${sessionScope.message.content} <br>
					</div>
				</div>
			</div>

			<div class="col-md-4" style="height:900px">

				<!-- 输入评论区域 -->
				<div style="margin:20px 10px auto;" class="control-group error">
					<p>输入你的评论
					<form action="addcriticism.action" method="post">
						<div class="input-group input-group-sm">
							<span class="input-group-addon glyphicon glyphicon-edit"></span>
							<input type="text" name="criticismtext" class="form-control">
						</div>

						<input type="submit" class="btn btn-info btn-xs" value="评论">
						<%-- 测试：${sessionScope.visitorname.visitorId} --%>
					</form>
				</div>
				<div>
					<!-- 显示评论信息 -->
					<div class="panel panel-success">
						<div class="panel-heading">评论</div>

						<c:forEach var="criticism" items="${sessionScope.criticismslist}">
							<!-- <div> -->
							<div class="panel-body">
								<table>
									<tr>
										<td style="font-size:15px;">
											<!-- 用于获取评论者的名字 --> <c:forEach var="visitors"
												items="${sessionScope.visitors}">
												<c:choose>
													<c:when test="${visitors.visitorId == criticism.visitorId}"> ${visitors.visitorName }
									</c:when>
												</c:choose>
											</c:forEach>
										</td>
									</tr>
									<tr>
										<td style="font-size:18px;">
											<!-- 评论内容：   --> ${criticism.criticismtext}
										</td>
									</tr>
									<tr>
										<td style="font-size:10px;">
											<!-- 评论日期： --> ${criticism.criticismDate}
										</td>
									</tr>
								</table>
							</div>
						</c:forEach>

						<!-- <div class="panel-body">Panel content -->

						<!-- </div> -->

					</div>

					<%-- <c:forEach var="criticism" items="${sessionScope.criticismslist}">
						<div>
							评论内容： ${criticism.criticismtext} 评论日期：${criticism.criticismDate}
							评论用户ID：${criticism.visitorId }


							<!-- 用于获取评论者的名字 -->
							<c:forEach var="visitors" items="${sessionScope.visitors}">
								<c:choose>
									<c:when test="${visitors.visitorId == criticism.visitorId}">评论者的名字${visitors.visitorName }
									</c:when>
								</c:choose>
							</c:forEach>
							
						</div>
					</c:forEach> --%>
				</div>
			</div>
		</div>

	</div>

	<div class="row">
		<div class="col-md-1"></div>
		<div class="col-md-10">@blackjm</div>
	</div>
</body>
</html>
